pwm: bcm2835: Calculate scaler in ->config()
authorStefan Wahren <stefan.wahren@i2se.com>
Tue, 1 Dec 2015 22:55:39 +0000 (22:55 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 17 Mar 2016 01:25:23 +0000 (01:25 +0000)
commit30117d0254349accd11141f3dee883e35c5a90cc
treea439db17d154b49730e2da7c2f1650e39db8463b
parente5f76735f0565618ee624b2c8f5465860ee19dfb
pwm: bcm2835: Calculate scaler in ->config()

Currently pwm-bcm2835 assumes a fixed clock rate and stores the
resulting scaler in the driver structure. But with the upcoming
PWM clock support for clk-bcm2835 the rate could change, so
calculate the scaler in the ->config() callback.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Gbp-Pq: Topic features/arm/rpi
Gbp-Pq: Name pwm-bcm2835-calculate-scaler-in-config.patch
drivers/pwm/pwm-bcm2835.c